package com.uzai.console.web.wechatapp;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.uzai.common.enums.DeviceTypeEnum;
import com.uzai.console.dto.wechatprivate.configplan.ConfigPlanQuery;
import com.uzai.console.service.configplan.ConfigPlanService;
import com.uzai.console.vo.wechatprivate.configplan.ConfigPlanSelectListVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mingyang.chen create in 2023/5/29 11:07
 */
@Api(value = "APP配置方案", tags = "APP|配置方案")
@ApiSort(4)
@RestController
public class AppConfigPlanController {

    @Autowired
    private ConfigPlanService configPlanService;

    @ApiOperation(value = "查询APP配置方案列表", notes = "查询APP配置方案列表", response = ConfigPlanSelectListVo.class)
    @ApiOperationSupport(order = 1)
    @PostMapping("/configPlan/findAppConfigPlan")
    public Object findAppConfigPlan(@RequestBody ConfigPlanQuery query) {
        query.setDeviceType(DeviceTypeEnum.APP.getKey());
        return configPlanService.findAppConfigPlan(query);
    }
}
